<?php
include("include/config.inc.php");

if(!isset($_SESSION['s_activId']))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
else
{
  $i       = 0;
  $challanArray = array();
  
  $select = "SELECT challan
               FROM incoming
			        WHERE partyId = ".$_GET['partyId'];
  $selectResult = mysql_query($select);
  $row = mysql_fetch_array($selectResult);
  while($row = mysql_fetch_array($selectResult))
  {
  	$challanArray['challan'][$i] = $row['challan'];
  	$i++;
  }
	include("./bottom.php");
	$smarty->assign("challanArray",$challanArray);
  $smarty->display("dataChallanAj.tpl");
}
?>